/**
 * Created by djh on 2016/11/8.
 * 交易管理公共js
 *
 */
define(function(require,exports){
   var common = require("common");


    exports.init = function() {

        common.leftNav({dl:3,dd:5});
        common.topMenu(1);
        //删除站内信
        $('.js-delete').click(function(){
            var id=$(this).parents('tr').attr('data-id');
            layer.confirm('您确定要删除吗？', {
                btn: ['确定','取消'] //按钮
            }, function(){
                common.ajaxHandle({
                    url:'remind_delete',
                    data:{id : id}
                })
            })
        });
        //站内信更新为已读状态
        $('.js-read').click(function(){
            var id=$(this).parents('tr').attr('data-id');
            common.ajaxHandle({
                url:'remind_update_is_read',
                data:{id : id},
                callback:function(){
                    layer.msg("状态修改成功");
                    $('.td-is-read-'+id).text('已读');
                }
            })



        });
    }
});
